package com.epam.Fish;

public class Goldfish extends Fish {

    public Goldfish(String name, int size, double price, String tint) {
        super(name, size, price);

        this.tint = tint;
    }

    private String tint;

    public String getTint() {
        return tint;
    }

    public void setTint(String tint) {
        if (tint != null){
            this.tint = tint;
        }
    }

    @Override
    public void eat() {
        System.out.println("Goldfish eating");
        hunger--;
        System.out.println("Hunger: " + hunger);
    }

    @Override
    public void swim() {
        System.out.println("Goldfish swimming");
        hunger++;
        System.out.println("Hunger: " + hunger);
    }

    @Override
    public String toString() {
        return "Goldfish [ Name: "+getName()+"; Price: "+getPrice()+"; Size:"+ getSize()+"; Tint: "+getTint()+"]";
    }


}
